package com.binary.coder.gift.core.domain.invitation.model.aggregate;

import cn.hutool.core.bean.BeanUtil;
import com.binary.coder.gift.core.domain.invitation.model.entity.DesignElementEntity;
import com.binary.coder.gift.core.infrastructure.po.invitation.InvitationRecord;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDate;
import java.util.List;

/**
 * @author atao
 * @version 1.0.0
 * @ClassName HandleInvitationReq.java
 * @Description 处理请帖邀请聚合
 * @createTime 2024年06月24日 09:54:00
 */
@Data
@ApiModel("处理请帖邀请的请求实体")
public class HandleInvitationRecordAggregate {

    @ApiModelProperty("请帖信息")
    private InvitationCardAggregate invitationCardAggregate;

    @ApiModelProperty(value = "受邀人ID", required = true, example = "12345")
    private Long userId;

    @ApiModelProperty(value = "请帖ID", required = true, example = "67890")
    private Long invitationId;

    @ApiModelProperty(value = "是否同意(0:否 1:是)", required = true, example = "1")
    private Integer agree;

    @ApiModelProperty(value = "参加日期（同意的时候选填）", required = false, example = "2024-07-15")
    private LocalDate dateOfDinner;

    @ApiModelProperty(value = "参加人数（同意的时候选填）", required = false, example = "5")
    private Integer peopleOfDinner;

    @ApiModelProperty(value = "拒绝参加的理由（不同意的时候选填）", required = false, example = "有其他安排")
    private String refuseReason;

    public InvitationRecord getInvitationRecord() {
        return BeanUtil.copyProperties(this, InvitationRecord.class);
    }

    public static HandleInvitationRecordAggregate build(InvitationRecord invitationRecord) {
        return BeanUtil.copyProperties(invitationRecord,HandleInvitationRecordAggregate.class);
    }

}

